package com.wuchao.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wuchao.entity.Menu;
import com.wuchao.entity.Role;
import com.wuchao.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wuchao.vo.UserVO;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author wuchao
 * @since 2022-03-29
 */
public interface UserService extends IService<User> {
    Page<User> findUserList(@Param("page") Page<User> page, @Param("userVO") UserVO userVO);

    Page<User> findUserList1(@Param("page") Page<User> page,@Param("userVO") UserVO userVO);
    /**
     * 导出用户Excel
     * @param response 响应前端
     * @param tbUsers 导出的数据集143
     * @throws IOException
     */
    void exportUserExcel(HttpServletResponse response, List<User> tbUsers) throws IOException;
    String login(String username,String password);
    User loadUserByUsername(String username);

    /**
     *
     * @param id
     * @return
     */
    List<Role> findRolesById(Long id);

    List<Menu> findMenuByRoles(List<Role> roles);
}
